package com.example.practical_training_projects.mapper;


import com.example.practical_training_projects.entity.praise_articles;
import org.apache.ibatis.annotations.*;

@Mapper
public interface praise_articlesMapper {

    @Insert("INSERT INTO praise_articles (a_uid,user_uid,create2_time) VALUES (#{a_uid},#{user_uid},sysdate())")
    Integer insertpraise(@Param("a_uid") Integer a_uid, @Param("user_uid")Integer user_uid);

    @Select("SELECT * FROM  praise_articles where a_uid = #{a_uid} and user_uid = #{user_uid}")
    praise_articles checkpraise(@Param("a_uid") Integer a_uid, @Param("user_uid")Integer user_uid);

    @Delete("DELETE FROM  praise_articles where a_uid =#{a_uid} and user_uid = #{user_uid}")
    Integer deletepraise(@Param("a_uid") Integer a_uid, @Param("user_uid")Integer user_uid);
}
